package back.service.impl;

import back.mapper.UserMapper;
import back.pojo.User;
import back.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    public List getUsers(User user) {
        return userMapper.getUsers(user);
    }

    public int getCountUser(User user){
        return userMapper.getCountUser(user);
    }

    public User getUserById(int id){
        return userMapper.getUserById(id);
    }

    public void addUser(User user) {
        userMapper.addUser(user);
    }

    public void updateUser(User user){
        userMapper.updateUser(user);
    }

    public void deleteUserById(int id){
        userMapper.deleteUserById(id);
    }

    public void deleteUser(List<Integer> ids) {
        userMapper.deleteUser(ids);
    }
}
